import { Node } from "cc";
import { ecs } from "db://app-game/libs/ecs/ECS";

/** 摄像机组件 */
@ecs.register("CameraModel")
export class CameraModelComp extends ecs.Comp {
  id: number = -1;
  /** 摄像机节点 */
  cameraNode: Node = null;
  /** 摄像机跟随的目标 */
  target: Node = null;
  /** 摄像机渲染宽度 */
  renderWidth: number = 0;
  /** 摄像机渲染高度 */
  renderHeight: number = 0;

  reset(entity: ecs.Entity): void {
    this.id = -1;
    this.cameraNode = null;
    this.target = null;
  }
}
